package com.tianji.learning.controller;


import com.tianji.learning.domain.vo.PointsStatisticsVO;
import com.tianji.learning.domain.vo.SignResultVO;
import com.tianji.learning.service.IPointsRecordService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 学习积分记录，每个月底清零 前端控制器
 * </p>
 *
 * @author 积分榜
 * @since 2023-04-17
 */
@RestController
@RequestMapping("/points-record")
@RequiredArgsConstructor
public class PointsRecordController {

    private IPointsRecordService recordService;

    @PostMapping("/sign-records")
    public SignResultVO singresult(){
        return recordService.singresult();

    }

    @GetMapping("/points/today")
    public List<PointsStatisticsVO> pointsStatisticsVOS (){
        return recordService.points();
    }



}
